import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * @author gao
 * @date 2025/8/11 16:12
 */

public class Demo2 {
    public static void main(String[] args) {
        try (OutputStream outputStream = new FileOutputStream("./test.txt", true)) {
            // “你好“的字符编码
            //byte[] bytes = new byte[]{(byte) 0xe4, (byte) 0xbd, (byte) 0xa0, (byte) 0xe5, (byte) 0xa5, (byte) 0xbd};
            byte[] bytes = new byte[]{97, 98, 99, 100};
            outputStream.write(bytes);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}